package sample;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.stage.Stage;

public class BanQuanController {

    @FXML
    private void handleCloseButtonAction(ActionEvent event) {
        Node source = (Node) event.getSource();
        // 获取按钮所在的窗口
        Stage stage = (Stage) source.getScene().getWindow();
        // 关闭窗口
        stage.close();
    }

}
